package com.zy.chat.vo;

import com.zy.chat.entity.ChatGroup;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class GroupDoc {
    private Integer id;

    private Integer groupId;

    private  String groupName;

    private  String userName;

    private  String groupAvatarUrl;
    private List<String> suggestion;

    public GroupDoc(ChatGroup chatGroup) {
        this.id = chatGroup.getId();
        this.groupId = chatGroup.getGroupId();
        this.groupName = chatGroup.getGroupName();
        this.userName = chatGroup.getUserName();
        this.groupAvatarUrl = chatGroup.getGroupAvatarUrl();
        this.suggestion=new ArrayList<>();
        this.suggestion.add(this.groupName);
    }
}
